package org.example.shop.api;

import org.example.shop.dao.GoodsDao;
import org.example.shop.pojo.Goods;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
@CrossOrigin
public class GoodsRecommendController {
    @Resource
    private GoodsDao goodsDao;

    @RequestMapping("/index/recommend")
    public List<Goods> queryIndexRecommendGoods() {
        List<Goods> list = new ArrayList<>();
        return goodsDao.findAll();
    }
}
